package com.l.web.service.system.user;

import org.l.qiao.*;
import org.l.qiao.base.LType;

import java.util.Map;

public class User extends Cluster {

    /**
     * 帐号
     */
    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = "^[\\w\\d]{3,20}$", nullable = false)
    public static final String USER_NAME = "userName";

    /**
     * 姓名
     */
    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = "^[\\w\u4e00-\u9fa5]{1,20}$", nullable = false)
    public static final String NAME = "name";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = Validate.MD5, nullable = false)
    public static final String PASSWORD = "password";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = Validate.OBJECTID, nullable = false)
    public static final String ROLE_ID = "roleId";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = Validate.OBJECTID, nullable = true)
    public static final String GROUP_ID = "groupId";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = Validate.OBJECTID, nullable = true)
    public static final String CLASS_ID = "classId";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = "", nullable = true)
    public static final String NOTES = "notes";

    public static final String CREATED = "created";

    public User() {
        super();
    }

    public User(Map<String, Object> map) {
        super(map);
    }

}
